package cn.stronglink.assetmanage;

import android.app.Application;
import android.os.Looper;

import Scaner.InfraredScanerFactory;
import cn.stronglink.assetmanage.utils.CrashHandler;

/**
 * Created by Tgb on 2018/5/25.
 */

public class MyApplication extends Application {
    public static MyApplication APP_CONTEXT;
    public static int widthPixels = 1024;// 屏幕宽度
    public static int heightPixels = 768;// 屏幕高度

    @Override
    public void onCreate() {
        super.onCreate();
        APP_CONTEXT = this;
        final InfraredScanerFactory factory = new InfraredScanerFactory(this);
        new Thread(new Runnable() {
            @Override
            public void run() {
                Looper.prepare();
                factory.createScaner();
                factory.createRfid();
            }
        }).start();
        Thread.setDefaultUncaughtExceptionHandler(CrashHandler.getInstance(this));
    }

}
